package com.pkx.cloud.fse7.expand.group.service;

import com.pkx.cloud.fse7.expand.group.entity.DoorGroup;
import com.pkx.cloud.fse7.expand.group.entity.DoorGroupDetail;
import com.pkx.cloud.mybatis.comn.BaseSev;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 服务类
 *
 * @author chenwg
 * @since 2021-04-09
 */
public interface DoorGroupDetailService extends BaseSev<DoorGroupDetail> {

    /**
     * 分页列表
     *
     * @param doorGroupDetail
     * @return
     */
    Page<DoorGroupDetail> pageList(Page page, DoorGroupDetail doorGroupDetail);

    /**
     * 列表查询
     *
     * @param doorGroupDetail
     * @return
     */
    List<DoorGroupDetail> listByEntity(DoorGroupDetail doorGroupDetail);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    DoorGroupDetail selectById(String id);

    /**
     * 保存
     *
     * @param doorGroupDetail
     * @return
     */
    Boolean saveDoorGroupDetail(DoorGroupDetail doorGroupDetail);

    /**
     * 修改
     *
     * @param doorGroupDetail
     * @return
     */
    Boolean modify(DoorGroupDetail doorGroupDetail);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    Boolean deleteById(String id);

    Boolean deleteByGroupId(String groupId);

    Page<List<Map<String, Object>>> getGroupDetailByPath(Page page, DoorGroup doorGroup);

    List<DoorGroupDetail> getAllByPlanId(String planId);

    /**
     * 获取计划中的设备
     *
     * @param planIds
     * @return
     */
    List<DoorGroupDetail> getAllByPlanIds(List<String> planIds);

    List<DoorGroupDetail> getAllByGroupIds(List<String> groupIds);

    List<String> listDevice(java.lang.String groupId);

}
